home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Collection of Tools & Utilities
/
Collection of Tools and Utilities.iso
/
print
/
p1123mz4.zip
/
MAZE1123.DOC
< prev
next >
Wrap
Text File
|
1994-02-27
|
3KB
|
68 lines
February 27, 1994
Print mazes in three dimensions on your Panasonic 1123 printer.
To generate a three dimensional plot of a maze with hexagonal rooms,
issue the command "HEXAGON <random number seed> <bias>". (For example,
"HEXAGON 12345678 0.5".) A different random number seed will usually produce
a different maze. The "bias" is optional. It compensates for ribbon wear.
It defaults to 0.3 for a new ribbon. Use 0.5 or higher for a worn ribbon.
In each case, the maze is output to the file HEXAGON.MAZ and its solution is
output to the file HEXAGON.SOL. About 2 megabytes of expanded memory or
disk space are needed for virtual memory. If LPT1: is your Panasonic 1123
printer, "COPY /B HEXAGON.MAZ LPT1:" to print the maze. "COPY /B
HEXAGON.SOL LPT1:" to print the solution. Be sure to specify the /B switch!
Sample output HEXAGON.MAZ and HEXAGON.SOL are included.
SQUARE.EXE works like HEXAGON.EXE except that it yields mazes with
square rooms.
All of the Borland C++ 3.0 source code is supplied (with comments).
If you compile it, use the "large" model.
The following pieces of source code are specific to maze generation:
CELL.* -- Each instance of this class represents a room in a maze.
HEXMAZE.* -- each instance of this class is a maze having hexagonal
rooms.
HEXAGON.CPP -- the source for HEXAGON.EXE.
SQRMAZE.* -- each instance of this class is a maze having square
rooms.
SQUARE.CPP -- the source for SQUARE.EXE.
The following pieces may find application in other programs:
ORACLE.* -- Each object derived from this class is a random number
generator. "random_number()" returns integers uniformly distributed
between 0 and max_r_n_plus_1-1.
VARRAY.H -- a template for one dimensional virtual arrays; you can
use expanded memory or (if expanded memory is not available) disk
space to break the 640K limit in DOS.
TITILLAT.* -- an instance of this class displays a rotating bar to
let a user know a calculation intensive program is running.
PLOT3D.* -- an abstract class. Classes derived from this class may be
used to instantiate objects that will plot z=f(x,y) in three
dimensions. The derived classes must supply the functions
"aspect_ratio", "display_initialize", "pset", "num_x_pixels",
"num_y_pixels", and "write_outfile".
X1123X3D.* -- a class derived from PLOT3D. It plots z=f(x,y) in
three dimensions on Panasonic 1123 printers.
SPIKE.CPP demonstrates using VARRAY.H, TITILLAT.*, PLOT3D.*, and
X1123X3D.* to plot a simple mathematical function; SPIKE.EXE is the
corresponding executable code.
I am the author of all the code in this package. It may be freely
distributed.
-- James L. Dean
csvcjld@nomvs.lsumc.edu